package util.assembly;

import bo.Stock;
import dto.StockDTO;

public class StockAssembly {

	public static Stock toBO(StockDTO stockDTO) {
		
		Stock stock = new Stock();
		stock.setId(stockDTO.getId());
		stock.setCantidad(stockDTO.getCantidad());
		stock.setAlmacen(stockDTO.getAlmacen());
		return stock;
	}
	
	public static StockDTO toDTO(Stock stock) {
		
		StockDTO stockDTO = new StockDTO();
		stockDTO.setId(stock.getId());
		stockDTO.setCantidad(stock.getCantidad());
		stockDTO.setAlmacen(stock.getAlmacen());
		return stockDTO;
	}
}
